﻿using System;

class Rect
{
    public double width;
    public double height;

    public Rect()
    {
        this.width = 10;
        this.height = 10;
    }
    public Rect(double width, double height)
    {
        this.width = width;
        this.height = height;
    }
    public double RectPerimeter()
    {
        return (height + width) * 2;
    }
    public double RectArea()
    {
        return height * width;
    }
}

class PlainRect:Rect
{
    public double startX;
    public double startY;

    public PlainRect(double startX, double startY, double width, double height)
    {
        this.startX = startX;
        this.startY = startY;
        this.width = width;
        this.height = height;
    }

    public PlainRect()
    {
        this.startX = 0;
        this.startY = 0;
        this.width = 0;
        this.height = 0;
    }

    public Boolean IsInside(double x,double y)
    {
        if(x>=startX && y>=startY && x <= (startX + width) && y <= (startY + height))
        {
            return true;
        }
        return false;
    }
}

class Program
{
    static void Main(string[] args)
    {
        PlainRect p = new PlainRect(10, 10, 20, 10);
        Console.WriteLine($"长方形的面积：{p.RectArea()}");
        Console.WriteLine($"长方形的周长：{p.RectPerimeter()}");
        Console.WriteLine($"点（25.5，13）是否在长方形内：{p.IsInside(25.5, 13)}");
    }
}